package com.hyh.toyshopping.controller;

import com.hyh.toyshopping.model.Message;
import com.hyh.toyshopping.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @version 1.0
 * @BelongsProject:IntelliJ IDEA
 * @BelongsPackage:com.hyh.toyshopping.controller
 * @Author:hyhWTX
 * @ClassName:MessageController2
 * @CreateTime:2022年-12月-21日 17:14
 * @Description: TODO (一句话描述以下该类的功能)
 */

@RestController
@RequestMapping("manager/message")
public class MessageController2 {

    @Autowired
    private MessageService MessageService;

    @GetMapping("/getAll2")
    public List<Message> getAll() {
        return MessageService.getAllMessage();
    }
}
